package com.cn.file;

import java.io.Serializable;
import java.net.SocketAddress;

public class MessageStore implements Serializable {

    private static final long serialVersionUID = 8445773977080406428L;

    /**
     * 消息id
     */
    private String msgId;

    //队列id
    private int queueId;

    /**
     * 主题
     */
    private String topic;

    /**
     * 事务id
     */
    private String transactionId;

    private byte[] body;

    /**
     * 存储时间
     */
    private long storeTimestamp;

    private SocketAddress socketAddress;

    public MessageStore() {
    }

    public MessageStore(String msgId, int queueId, String topic, String transactionId, byte[] body) {
        this.msgId = msgId;
        this.queueId = queueId;
        this.topic = topic;
        this.transactionId = transactionId;
        this.body = body;
    }

    public String getMsgId() {
        return msgId;
    }

    public MessageStore setMsgId(String msgId) {
        this.msgId = msgId;
        return this;
    }

    public String getTopic() {
        return topic;
    }

    public MessageStore setTopic(String topic) {
        this.topic = topic;
        return this;
    }

    public String getTransactionId() {
        return transactionId;
    }

    public MessageStore setTransactionId(String transactionId) {
        this.transactionId = transactionId;
        return this;
    }

    public byte[] getBody() {
        return body;
    }

    public MessageStore setBody(byte[] body) {
        this.body = body;
        return this;
    }

    public long getStoreTimestamp() {
        return storeTimestamp;
    }

    public MessageStore setStoreTimestamp(long storeTimestamp) {
        this.storeTimestamp = storeTimestamp;
        return this;
    }


    public int getQueueId() {
        return queueId;
    }

    public void setQueueId(int queueId) {
        this.queueId = queueId;
    }

    public SocketAddress getSocketAddress() {

        return socketAddress;
    }

    public void setSocketAddress(SocketAddress socketAddress) {
        this.socketAddress = socketAddress;
    }
}
